/*      */ package handling.opcode;
/*      */
/*      */ import handling.ExternalCodeTableGetter;
/*      */ import handling.WritableIntValueHolder;
/*      */ import java.io.BufferedReader;
/*      */ import java.io.File;
/*      */ import java.io.FileInputStream;
/*      */ import java.io.IOException;
/*      */ import java.io.InputStreamReader;
/*      */ import java.util.Properties;
/*      */
/*      */ public enum RecvPacketOpcode implements WritableIntValueHolder {
    CHAT_SERVER_PONG(14, false),
    CHAT_SERVER_REQUEST(1, false),
    GUILD_CHAT(19, false),
    BUDDY_CHAT(20, false),
    CLIENT_HELLO(103, false),
    LOGIN_AUTHKEY(116, false),
    RSA_KEY(32766, false),
    CREATE_ULTIMATE(33),
    STRANGE_DATA(41),
    CLIENT_AUTH(102, false),
    LOGIN_PASSWORD(105, false),
    CP_WorldIdRequest(106),
    SERVERSTATUS_REQUEST(106),
    CHARLIST_REQUEST(107),
    PLAYER_LOGGEDIN(112, false),
    CHAR_SELECT(113),
    SERVERLIST_REQUEST(117),
    CHECK_CHAR_NAME(118),
    CREATE_CHAR(127),
    DELETE_CHAR(131),
    DELETE_CHAR_DONE(132),
    REDUCTION_CHAR(133),
    PART_TIME_JOB(32766),
    CHARACTER_CARDS(32766),
    CLIENT_ERROR(135, false),
    PONG(157, false),
    PONG2(158, false),
    CLIENT_FAIL(160, false),
    REQUEST_CONNECTION(163),
    CHAR_SELECTED(172),
    UPDATE_CHARSLOT(173),
    LICENSE_REQUEST(188),
    SET_GENDER(189),
    SET_CHAR_CARDS(32766),
    SET_ACC_CASH(197),
    QUICK_BUY_CS_ITEM(198),
    CREATE_CHAR_REQUEST(207),
    SEAL_FAMILIAR(208),
    BEGIN_USER(211),
    CHANGE_MAP(213),
    CHANGE_CHANNEL(214),
    ENTER_CASH_SHOP(218),
    ENTER_MTS(219),
    MOVE_PLAYER(224),
    CANCEL_CHAIR(225),
    USE_CHAIR(226),
    CP_UserEmoticonItemUseRequest(32766),
    CP_UserDanceStopRequest(32766),
    CLOSE_RANGE_ATTACK(229),
    RANGED_ATTACK(230),
    MAGIC_ATTACK(231),
    PASSIVE_ENERGY(232),
    CLUSTER_ATTACK(233),
    CP_UserSpotlightAttack(234),
    TAKE_DAMAGE(236),
    GENERAL_CHAT(238),
    ITEM_CHAT(239),
    CLOSE_CHALKBOARD(240),
    FACE_EXPRESSION(241),
    FACE_ANDROID(242),
    USE_ITEM_EFFECT(243),
    WHEEL_OF_FORTUNE(32766),
    USE_TITLE_EFFECT(245),
    USE_ACTIVATE_DAMAGE_SKIN(246),
    DAMAGESKIN_OPERATION(248),
    USE_ACTIVATE_DAMAGE_SKIN_PREMIUM(249),
    NPC_TALK(255),
    REMOTE_STORE(256),
    NPC_TALK_MORE(257),
    NPC_SHOP(258),
    STORAGE(259),
    USE_HIRED_MERCHANT(260),
    MERCH_ITEM_STORE(261),
    DUEY_ACTION(262),
    MECH_CANCEL(269),
    CP_UserSpecialEffectLocal(270),
    EXTRA_ATTACK(266),
    SHOW_FIREWALL_REQUEST(267),
    USE_HOLY_FOUNTAIN(268),
    CP_ReqMakingSkillEff(32766),
    OWL(270),
    OWL_WARP(271),
    MTS_OPERATION(272),
    LEAVE_MTS(273),
    ITEM_GATHER(275),
    ITEM_SORT(276),
    ITEM_MOVE(277),
    MOVE_BAG(279),
    SWITCH_BAG(284),
    CP_UserBagToBagItem(32766),
    CP_UserPourInBagToBag(32766),
    USE_ITEM(282),
    CANCEL_ITEM_EFFECT(283),
    CP_UserStatChangeByPortableChairRequest(32766),
    USE_SUMMON_BAG(285),
    PET_FOOD(286),
    USE_MOUNT_FOOD(32766),
    USE_SCRIPTED_NPC_ITEM(288),
    USE_RECIPE(289),
    USE_CASH_ITEM(290),
    USE_ADDITIONAL_ADD_ITEM(291),
    ALLOW_PET_LOOT(292),
    ALLOW_PET_AOTO_EAT(293),
    USE_OPTION_CHANGE_REQUEST(32766),
    USE_CATCH_ITEM(296),
    USE_SKILL_BOOK(297),
    USE_SP_RESET(298),
    USE_AP_RESET(299),
    USE_OWL_MINERVA(306),
    USE_TELE_ROCK(307),
    USE_RETURN_SCROLL(308),
    CP_UserFieldTransferRequest(314),
    USER_FIELD_TRANSFE_RREQUEST(309),
    USE_UPGRADE_SCROLL(310),
    USE_FLAG_SCROLL(311),
    USE_EQUIP_SCROLL(312),
    USE_EXITEM_UPGRADE(313),
    USE_POTENTIAL_SCROLL(318),
    USE_POTENTIAL_ADD_SCROLL(319),
    USE_ADDITIONAL_ITEM(320),
    USE_WEAPON_TEMP_OPTION(321),
    USE_SOULS_SCROLL(322),
    USE_SOUL_MARBLE(323),
    USE_MIRACLE_CUBE(324),
    USE_ENCHANTING(326),
    USE_ARCANE_FORCE_REQUEST(329),
    USE_BAG(331),
    USE_MAGNIFY_GLASS(332),
    USE_CRAFTED_CUBE(333),
    USE_INNERSKILL_REQUEST(334),
    TOADS_HAMMER_REQUEST(336),
    TOADS_HAMMER_HELP_REQUEST(337),
    DISTRIBUTE_AP(341),
    AUTO_ASSIGN_AP(342),
    HEAL_OVER_TIME(344),
    DEL_TEACH_SKILL(347),
    SET_TEACH_SKILL(348),
    DISTRIBUTE_SP(349),
    SPECIAL_MOVE(350),
    CANCEL_BUFF(352),
    ATTACK_BUFF(353),
    CANCEL_ATTACK_BUFF(32766),
    SKILL_EFFECT(359),
    MESO_DROP(32766),
    SUPER_CANNON_REQUEST(356),
    GIVE_FAME(358),
    CP_UserPartyRequest(32766),
    CHAR_INFO_REQUEST(360),
    SPAWN_PET(361),
    PET_AUTO_BUFF(362),
    CANCEL_DEBUFF(363),
    CHANGE_MAP_SPECIAL(364),
    USE_INNER_PORTAL(366),
    TROCK_ADD_MAP(368),
    LIE_DETECTOR(369),
    LIE_DETECTOR_SKILL(370),
    LIE_DETECTOR_REFRESH(371),
    REPORT(372),
    QUEST_ACTION(373),
    REISSUE_MEDAL(374),
    MOVE_ENERGY(376),
    SPECIAL_ATTACK(377),
    SPECIAL_ATTACK_DISAPPEAR(378),
    SKILL_MACRO(381),
    REWARD_ITEM(383),
    ITEM_MAKER(386),
    REPAIR_ALL(387),
    REPAIR(388),
    SOLOMON(32766),
    GACH_EXP(32766),
    FOLLOW_REQUEST(391),
    FOLLOW_REPLY(392),
    AUTO_FOLLOW_REPLY(395),
    PROFESSION_INFO(396),
    USE_POT(397),
    CLEAR_POT(398),
    FEED_POT(399),
    CURE_POT(400),
    REWARD_POT(401),
    USE_COSMETIC(403),
    DF_COMBO(406),
    USER_TRUMP_SKILL_ACTION_REQUEST(408),
    DOT_HEAL_HP_REQUEST(409),
    USER_DAZZLE_HIT(412),
    USE_REDUCER(413),
    USE_REDUCER_PRESTIGE(415),
    SAVE_BUFF_EFFECT(417),
    PVP_RESPAWN(32766),
    CHANGE_ZERO_LOOK(32766),
    CHANGE_ZERO_LOOK_END(32766),
    PARTYCHAT(441),
    ITEM_PARTYCHAT(442),
    WHISPER(444),
    ITEM_WHISPER(445),
    MESSENGER(446),
    PLAYER_INTERACTION(447),
    PARTY_OPERATION(449),
    DENY_PARTY_REQUEST(450),
    ALLOW_PARTY_INVITE(451),
    EXPEDITION_OPERATION(452),
    EXPEDITION_LISTING(453),
    GUILD_OPERATION(455),
    DENY_GUILD_REQUEST(456),
    GUILD_APPLY(457),
    CANCAEL_GUILD_REQUEST(458),
    ACCEPT_GUILD_APPLY(459),
    DENY_GUILD_APPLY(268),
    TOWER_RANK_REQUEST(462),
    ADMIN_COMMAND(32766),
    BUDDYLIST_MODIFY(469),
    NOTE_ACTION(473),
    RPS_GAME(474),
    USE_DOOR(475),
    USE_MECH_DOOR(477),
    CHANGE_KEYMAP(480),
    RING_ACTION(485),
    ARAN_COMBO(495),
    LOST_ARAN_COMBO(496),
    DEMON_RAGE(499),
    OVERLOAD_MODE_RESPONSE(500),
    CRAFT_DONE(504),
    CRAFT_EFFECT(505),
    CRAFT_MAKE(506),
    MICRO_BUFF_END_TIME(508),
    CHANGE_MARKET_MAP(511),
    MEMORY_SKILL_CHOOSE(513),
    MEMORY_SKILL_CHANGE(513),
    MEMORY_SKILL_OBTAIN(514),
    BUY_CROSS_ITEM(524),
    USE_TEMPEST_BLADES(526),
    USE_COMMAND_SKILL(532),
    DISTRIBUTE_HYPER_SP(533),
    RESET_HYPER_SP(534),
    DISTRIBUTE_HYPER_AP(535),
    RESET_HYPER_AP(536),
    CHANGE_PLAYER(551),
    UNKNOWN_168(553),
    LIE_DETECTOR_RESPONSE(561),
    USER_HOWLING_STORM_STACK(569),
    USER_HOWLING_STORM_STACK_ATTACK_REQUEST(575),
    EVENT_LIST(585),
    ADD_ATTACK_RESET(32766),
    SOUL_MODE(599),
    FAMILIAR_OPERATION(601),
    USE_TOWERCHAIR_SETTING(607),
    OPEN_MAPLE_UNION_REQUEST(612),
    TRADE_KING_SHOP_ACTION(606),
    TRADE_KING_SHOP_REFLASH(607),
    VMATRIX_MAKE_REQUEST(628),
    VMATRIX_HELP_REQUEST(629),
    CP_OPEN_VMATRIX_WINDOW_REQUEST(630),
    YHYR_ENERGY(632),
    SPECIAL_MAP_REVIVE(633),
    FORCE_TARGET_REQUEST(633),
    MOVE_PET(653),
    PET_CHAT(654),
    PET_COMMAND(655),
    PET_LOOT(656),
    PET_AUTO_POT(657),
    PET_EXCEPTION_LIST(658),
    PET_AOTO_EAT(659),
    MOVE_LITTLEWHITE(663),
    MOVE_SUMMON(670),
    SUMMON_ATTACK(671),
    DAMAGE_SUMMON(672),
    SUB_SUMMON(673),
    SUMMON_MAGIC_ALTAR(674),
    REMOVE_SUMMON(675),
    SUMMON_ACTION(676),
    MOVE_DRAGON(687),
    DRAGON_FLY(688),
    MOVE_ANDROID(691),
    SUB_LITTLEWHITE(32766),
    QUICK_SLOT(698),
    PASSIVE_SKILL_INFO_UPDATE(699),
    PLAYER_VIEW_RANGE(702),
    SYSTEM_PROCESS_LIST(706),
    NOTE_OPERATION(707),
    CHANGE_POTENTIAL_BOX(712),
    CHANGE_POTENTIAL_WP(713),
    CHANGE_POTENTIAL(714),
    SHOW_LOVE_RANK(716),
    SPAWN_ARROWS_TURRET(722),
    USE_GROWTH_HELPER_REQUEST(746),
    WARLOCK_MAGIC_ATTACK(753),
    RUN_SCRIPT(754),
    ENTER_STARTPLANET(32766),
    GAME_EXIT(32766),
    TRACK_FLAMES(805),
    SELECT_JAGUAR(811),
    GIVE_KSPSYCHIC(839),
    ATTACK_KSPSYCHIC(840),
    CANCEL_KSPSYCHIC(841),
    CP_ReserveDamagePsychicLock(836),
    GIVE_KSULTIMATE(843),
    ATTACK_KSULTIMATE(844),
    MIST_KSULTIMAT(845),
    CANCEL_KSULTIMATE(846),
    CP_PsychicOverRequest(847),
    CROSS_ATTACK(854),
    SIGNIN_OPERATION(855),
    ARAN_LOCK_COMMAND(856),
    AUTO_NZ(856),
    ANGER_CHANGE_TYPE(858),
    USER_CANNON_GUN(858),
    SLIDE_REQUEST(866),
    MULTI_SKILL_ATTACK_REQUEST(871),
    REMOTE_DICE_REQUEST(878),
    MULTI_SKILL_CHARGE_REQUEST(879),
    GIVE_SPOTLIGHT_BUFF(882),
    MAPLE_UNION_REQUEST(883),
    ANDROID_CHANGE_EAR(886),
    LOAD_MAPLE_UNION(888),
    CANCEL_KEYDOWNSKILL(918),
    USE_NEBULITE(951),
    USE_ALIEN_SOCKET(32766),
    USE_ALIEN_SOCKET_RESPONSE(32766),
    USE_NEBULITE_FUSION(32766),
    POTION_POT_USE(954),
    POTION_POT_ADD(POTION_POT_USE.getValue() + 1),
    POTION_POT_MODE(POTION_POT_USE.getValue() + 2),
    POTION_POT_INCR(POTION_POT_USE.getValue() + 3),
    USE_SPECIAL_ITEM(965),
    APPLY_HYUNCUBE(970),
    APPLY_ONLYCUBE(971),
    CALL_FRIENDS(972),
    BBS_OPERATION(32766),
    SELECT_CHAIR(992),
    TRANSFORM_PLAYER(996),
    OPEN_AVATAR_RANDOM_BOX(32766),
    FISHING(1003),
    USE_TREASUER_CHEST(1004),
    SHIKONGJUAN(1013),
    SET_CHAR_CASH(1018),
    OPEN_WORLDMAP(1021),
    SAVE_DAMSKIN(32766),
    CHANGE_DAMSKIN(32766),
    DELETE_DAMSKIN(32766),
    MOVE_LIFE(1064),
    AUTO_AGGRO(MOVE_LIFE.getValue() + 1),
    MONSTER_HIT_BY_MOB(1069),
    MONSTER_BOMB(1071),
    MONSTER_HIT_BY_OBSTACLE_ATOM(1073),
    MOB_SKILLDELAY_END(1074),
    MONSTER_ESCORT_COLLISION(1076),
    MONSTER_TIME_BOMB_END(1077),
    FRIENDLY_DAMAGE(32766),
    MONSTER_BOMB_COLLISION_GROUP(32766),
    MONSTER_SPECIAL_SKILL(1043),
    NPC_ACTION(1102),
    ITEM_PICKUP(1108),
    DAMAGE_REACTOR(1111),
    TOUCH_REACTOR(1112),
    MAKE_EXTRACTOR(1131),
    SNOW_BALL_HIT(32766),
    PLAYER_UPDATE(1156),
    PARTY_SEARCH_START(1159),
    PARTY_SEARCH_STOP(1160),
    START_HARVEST(1165),
    STOP_HARVEST(1166),
    QUICK_MOVE(1169),
    USE_RUNE(1170),
    USE_RUNE_SKILL_REQ(1171),
    OBTACLE_ATOM_COLLISION(1173),
    PEACE_ENVOY_LASTATTACK(1181),
    DEMIANOBJECT_MAKE_ENTER_ACK(1312),
    DEMIANOBJECT_NODE_END(DEMIANOBJECT_MAKE_ENTER_ACK.getValue() + 1),
    DEMIANOBJECT_ERR_RECREATE(DEMIANOBJECT_MAKE_ENTER_ACK.getValue() + 2),
    DEMIAN_FIYINGSWORD_ATK(1316),
    DEMIAN_FIYINGSWORD_REBIRTH(1312),
    LUCID_SCREEN_ATK_END(1335),
    CANCEL_SKY_SWORD(1446),
    CS_UPDATE(1467),
    BUY_CS_ITEM(CS_UPDATE.getValue() + 1),
    COUPON_CODE(CS_UPDATE.getValue() + 2),
    SEND_CS_GIFI(CS_UPDATE.getValue() + 4),
    USE_HAMMER(1503),
    CP_GoldHammerComplete(1504),
    HAMMER_RESPONSE(1506),
    BATTLE_STATISTICS(1509),
    HIDDEN_TAIL_ADN_EAR(1524),
    SAIL_TRADE_ACTION(32766),
    PAM_SONG(32766),
    TAP_JOY_RESPONSE(1536),
    TAP_JOY_DONE(TAP_JOY_RESPONSE.getValue() + 1),
    TAP_JOY_NEXT_STAGE(TAP_JOY_RESPONSE.getValue() + 2),
    STAR_REWARD(1533),
    EFFECT_SWITCH(1549),
    Count(1552),
    UNKNOWN;

    /*      */
    /*      */   static {
        /* 1316 */     reloadValues();
        /*      */   }
    /*      */
    /* 1319 */   private int code = -2;
    /*      */
    /*      */   private boolean CheckState;
    /*      */
    /*      */   RecvPacketOpcode() {
        /* 1323 */     this.CheckState = true;
        /*      */   }
    /*      */
    /*      */   RecvPacketOpcode(int code) {
        /* 1327 */     this.code = code;
        /*      */   }
    /*      */
    /*      */   RecvPacketOpcode(int code, boolean CheckState) {
        /* 1331 */     this.CheckState = CheckState;
        /* 1332 */     this.code = code;
        /*      */   }
    /*      */
    /*      */   public static String getNamebyID(int val) {
        /* 1337 */     for (RecvPacketOpcode op : values()) {
            /* 1338 */       if (op.getValue() == val)
                /* 1339 */         return op.name();
            /*      */     }
        /* 1342 */     return "UNKNOWN";
        /*      */   }
    /*      */
    /*      */   public static RecvPacketOpcode getByType(int type) {
        /* 1346 */     for (RecvPacketOpcode l : values()) {
            /* 1347 */       if (l.getValue() == type)
                /* 1348 */         return l;
            /*      */     }
        /* 1351 */     return UNKNOWN;
        /*      */   }
    /*      */
    /*      */   public static short getIDbyName(String val) {
        /* 1355 */     for (RecvPacketOpcode op : values()) {
            /* 1356 */       if (op.name() == val)
                /* 1357 */         return op.getValue();
            /*      */     }
        /* 1360 */     return -2;
        /*      */   }
    /*      */
    /*      */   public static Properties getDefaultProperties() throws IOException {
        /* 1364 */     Properties props = new Properties();
        /* 1365 */     FileInputStream fileInputStream = new FileInputStream("properties/recvops.properties");
        /* 1366 */     InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, "GBK");
        /* 1367 */     BufferedReader buff = new BufferedReader(inputStreamReader);
        /* 1368 */     props.load(buff);
        /* 1369 */     buff.close();
        /* 1370 */     inputStreamReader.close();
        /* 1371 */     fileInputStream.close();
        /* 1372 */     return props;
        /*      */   }
    /*      */
    /*      */   public static void reloadValues() {
        /*      */     try {
            /* 1377 */       File file = new File("properties/recvops.properties");
            /* 1378 */       if (file.exists())
                /* 1379 */         ExternalCodeTableGetter.populateValues(getDefaultProperties(), values());
            /* 1381 */     } catch (IOException e) {
            /* 1382 */       throw new RuntimeException("加载 recvops.properties 文件出现错误", e);
            /*      */     }
        /*      */   }
    /*      */
    /*      */   public short getValue() {
        /* 1388 */     return (short)this.code;
        /*      */   }
    /*      */
    /*      */   public void setValue(short code) {
        /* 1393 */     this.code = code;
        /*      */   }
    /*      */
    /*      */   public boolean NeedsChecking() {
        /* 1397 */     return this.CheckState;
        /*      */   }
    /*      */ }

